Optimal. Leaf size=352 \[ \frac {(a-b) \sqrt {a+b} (A-2 C) \cot (c+d x) E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b d}+\frac {\sqrt {a+b} (A b+2 (a-b) C) \cot (c+d x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b d}-\frac {A b \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a d}+\frac {A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 352, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4180, 4143,
4006, 3869, 3917, 4089} \begin {gather*} \frac {\sqrt {a+b} (2 C (a-b)+A b) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b d}+\frac {(a-b) \sqrt {a+b} (A-2 C) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b d}-\frac {A b \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a d}+\frac {A \sin (c+d x) \sqrt {a+b \sec (c+d x)}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3869
Rule 3917
Rule 4006
Rule 4089
Rule 4143
Rule 4180
Rubi steps
\begin {align*} \int \cos (c+d x) \sqrt {a+b \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{d}+\int \frac {\frac {A b}{2}+a C \sec (c+d x)-\frac {1}{2} b (A-2 C) \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=\frac {A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{d}-\frac {1}{2} (b (A-2 C)) \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx+\int \frac {\frac {A b}{2}+\left (\frac {1}{2} b (A-2 C)+a C\right ) \sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=\frac {(a-b) \sqrt {a+b} (A-2 C) \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b d}+\frac {A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{d}+\frac {1}{2} (A b) \int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx+\frac {1}{2} (A b+2 (a-b) C) \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=\frac {(a-b) \sqrt {a+b} (A-2 C) \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b d}+\frac {\sqrt {a+b} (A b+2 (a-b) C) \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b d}-\frac {A b \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a d}+\frac {A \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(723\) vs. \(2(352)=704\).
time = 17.79, size = 723, normalized size = 2.05 \begin {gather*} \frac {2 C \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{d}+\frac {\sqrt {a+b \sec (c+d x)} \sqrt {\frac {1}{1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}} \left (a A \tan \left (\frac {1}{2} (c+d x)\right )+A b \tan \left (\frac {1}{2} (c+d x)\right )-2 a C \tan \left (\frac {1}{2} (c+d x)\right )-2 b C \tan \left (\frac {1}{2} (c+d x)\right )-2 a A \tan ^3\left (\frac {1}{2} (c+d x)\right )+4 a C \tan ^3\left (\frac {1}{2} (c+d x)\right )+a A \tan ^5\left (\frac {1}{2} (c+d x)\right )-A b \tan ^5\left (\frac {1}{2} (c+d x)\right )-2 a C \tan ^5\left (\frac {1}{2} (c+d x)\right )+2 b C \tan ^5\left (\frac {1}{2} (c+d x)\right )+2 A b \Pi \left (-1;\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+2 A b \Pi \left (-1;\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+(a+b) (A-2 C) E\left (\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}-2 (A b-(a+b) C) F\left (\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}\right )}{d \sqrt {b+a \cos (c+d x)} \sqrt {\sec (c+d x)} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^{3/2} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{1+\tan ^2\left (\frac {1}{2} (c+d x)\right )}}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1604\) vs.
\(2(323)=646\).
time = 0.25, size = 1605, normalized size = 4.56
method | result | size |
default | \(\text {Expression too large to display}\) | \(1605\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sqrt {a + b \sec {\left (c + d x \right )}} \cos {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \cos \left (c+d\,x\right )\,\left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________